ukraine_map <-
gisco_get_countries(
country = c("Ukraine"),
resolution = "3",
epsg = "4326",
year = "2016"
)
coast <- gisco_get_coastallines(
resolution = "3",
epsg = "4326",
year = "2016"
)
ggplot(coast) +
geom_sf(color = "white") +
geom_sf(data = ukraine_map, fill = "grey80", color = "white") +
coord_sf(
xlim = c(22, 41),
ylim = c(44, 53)
) +
theme(
axis.ticks = element_blank(),
axis.text = element_blank()
) +
facet_wrap(vars(NAME_ENGL), ncol = 2)
ukraine_acled <- read_csv("feb24_april1.csv")
## Rows: 2765 Columns: 31
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (18): event_id_cnty, event_date, event_type, sub_event_type, actor1, ass...
## dbl (13): data_id, iso, event_id_no_cnty, year, time_precision, inter1, inte...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
glimpse(ukraine_acled)
## Rows: 2,765
## Columns: 31
## $ data_id <dbl> 8982947, 8982957, 8982966, 8982975, 8982978, 8982981,…
## $ iso <dbl> 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, 804…
## $ event_id_cnty <chr> "UKR54326", "UKR54357", "UKR54488", "UKR54521", "UKR5…
## $ event_id_no_cnty <dbl> 54326, 54357, 54488, 54521, 54537, 54552, 54558, 5456…
## $ event_date <chr> "01 April 2022", "01 April 2022", "01 April 2022", "0…
## $ year <dbl> 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,…
## $ time_precision <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ event_type <chr> "Explosions/Remote violence", "Battles", "Battles", "…
## $ sub_event_type <chr> "Shelling/artillery/missile attack", "Non-state actor…
## $ actor1 <chr> "Military Forces of Russia (2000-)", "Military Forces…
## $ assoc_actor_1 <chr> NA, NA, "NAF: United Armed Forces of Novorossiya; Don…
## $ inter1 <dbl> 8, 8, 8, 1, 1, 8, 8, 8, 8, 1, 1, 1, 8, 1, 1, 1, 1, 8,…
## $ actor2 <chr> "Civilians (Ukraine)", "Military Forces of Ukraine (2…
## $ assoc_actor_2 <chr> "Health Workers (Ukraine)", NA, NA, "NAF: United Arme…
## $ inter2 <dbl> 7, 1, 1, 8, 8, 7, 1, 7, 0, 8, 8, 8, 1, 8, 8, 8, 8, 7,…
## $ interaction <dbl> 78, 18, 18, 18, 18, 78, 18, 78, 80, 18, 18, 18, 18, 1…
## $ region <chr> "Europe", "Europe", "Europe", "Europe", "Europe", "Eu…
## $ country <chr> "Ukraine", "Ukraine", "Ukraine", "Ukraine", "Ukraine"…
## $ admin1 <chr> "Chernihiv", "Kharkiv", "Donetsk", "Donetsk", "Donets…
## $ admin2 <chr> "Chernihivskyi", "Iziumskyi", "Mariupolskyi", "Pokrov…
## $ admin3 <chr> "Chepnigivska", "Iziumska", "Mariupolska", "Marinska"…
## $ location <chr> "Chernihiv", "Izium", "Mariupol", "Marinka", "Novobak…
## $ latitude <dbl> 51.5055, 49.2088, 47.1298, 47.9425, 48.2489, 47.4029,…
## $ longitude <dbl> 31.2849, 37.2485, 37.5710, 37.5050, 37.7875, 37.7328,…
## $ geo_precision <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,…
## $ source <chr> "24 Channel; Suspilne Media", "Flot 2017; Novoye Vrem…
## $ source_scale <chr> "National", "Local partner-New media", "Other-Nationa…
## $ notes <chr> "On 1 April 2022, Russian forces shelled the oncology…
## $ fatalities <dbl> 0, 0, 0, 4, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ timestamp <dbl> 1649184809, 1649184809, 1649184809, 1649184809, 16491…
## $ iso3 <chr> "UKR", "UKR", "UKR", "UKR", "UKR", "UKR", "UKR", "UKR…
protests_ukr <- ukraine_acled %>%
filter(actor1 == "Protesters (Ukraine)") %>%
mutate(clean_date = dmy(event_date)) %>%
group_by(clean_date, location)
protests_ukr %>%
select(clean_date, latitude, longitude, location)
protests_ukr$clean_date <- as.Date(protests_ukr$clean_date)
protests_ukr$latitude <- as.numeric(protests_ukr$latitude)
protests_ukr$longitude <- as.numeric(protests_ukr$longitude)
map_final <- ggplot(coast) +
geom_sf(color = "white") +
geom_sf(data = ukraine_map, fill = "grey80", color = "white") +
geom_point(data = protests_ukr, aes(x = longitude, y = latitude),
colour = "#c74eb9", alpha = 0.5) +
coord_sf(
xlim = c(22, 41),
ylim = c(44, 53)
) +
theme(
axis.ticks = element_blank(),
axis.text = element_blank()
) +
facet_wrap(vars(CNTR_NAME), ncol = 2) +
labs(title = "Date: {frame_time}") +
transition_time(clean_date) +
ease_aes("linear")
animate(map_final)
Безстрашні херсонці!
— Громадське радіо (@HromadskeRadio) March 5, 2022
Один з учасників акції «Херсон — це Україна» виліз з українським стягом прямо на техніку російських окупантів! 🇺🇦
Fearless Kherson residents!
A man climbed with the Ukrainian flag directly on the machinery of the Russian occupiers! pic.twitter.com/ea6iXpaTIb
ggplot(coast) +
geom_sf(color = "white") +
geom_sf(data = ukraine_map, fill = "grey80", color = "white") +
geom_point(data = protests_ukr, aes(x = longitude, y = latitude),
colour = "#c74eb9", alpha = 0.5) +
coord_sf(
xlim = c(22, 41),
ylim = c(44, 53)
) +
theme(
axis.ticks = element_blank(),
axis.text = element_blank()
) +
facet_wrap(vars(CNTR_NAME), ncol = 2)
rus_mil <- ukraine_acled %>%
filter(str_detect(actor1, "Military Forces of Russia")) %>%
mutate(clean_date = dmy(event_date)) %>%
group_by(clean_date, location)
rus_mil %>%
select(clean_date, longitude, latitude, location, event_type)
ggplot(coast) +
geom_sf(color = "white") +
geom_sf(data = ukraine_map, fill = "grey80", color = "white") +
geom_point(data = rus_mil, aes(x = longitude, y = latitude),
colour = "#b82f25", alpha = 0.20, size = 0.3) +
coord_sf(
xlim = c(22, 41),
ylim = c(44, 53)
) +
theme(
axis.ticks = element_blank(),
axis.text = element_blank()
) +
facet_wrap(vars(CNTR_NAME), ncol = 2)
ukr_mil <- ukraine_acled %>%
filter(str_detect(actor1, "Military Forces of Ukraine")) %>%
mutate(clean_date = dmy(event_date)) %>%
group_by(clean_date, location)
ukr_mil %>%
select(clean_date, longitude, latitude, location, event_type)
ggplot(coast) +
geom_sf(color = "white") +
geom_sf(data = ukraine_map, fill = "grey80", color = "white") +
geom_point(data = ukr_mil, aes(x = longitude, y = latitude),
colour = "#4173e8", alpha = 0.20, size = 0.3) +
coord_sf(
xlim = c(22, 41),
ylim = c(44, 53)
) +
theme(
axis.ticks = element_blank(),
axis.text = element_blank()
) +
facet_wrap(vars(CNTR_NAME), ncol = 2)
ukr_mil_map <- ggplot(coast) +
geom_sf(color = "white") +
geom_sf(data = ukraine_map, fill = "grey80", color = "white") +
geom_point(data = ukr_mil, aes(x = longitude, y = latitude),
colour = "#4173e8", alpha = 0.2, size = 0.3) +
coord_sf(
xlim = c(22, 41),
ylim = c(44, 53)
) +
theme(
axis.ticks = element_blank(),
axis.text = element_blank()
) +
facet_wrap(vars(CNTR_NAME), ncol = 2) +
labs(title = "Date: {frame_time}") +
transition_time(clean_date) +
ease_aes("linear")
animate(ukr_mil_map)